package com.dms.modules.product.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 商品实体类
 */
@Data
@Accessors(chain = true)
@TableName("product")
@ApiModel(value = "商品实体", description = "商品信息")
public class Product {

    @ApiModelProperty("商品ID")
    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("店铺ID")
    private Long merchantId;

    @ApiModelProperty("商品分类ID")
    private Long categoryId;

    @ApiModelProperty("商品名称")
    private String name;

    @ApiModelProperty("商品副标题")
    private String subtitle;

    @ApiModelProperty("商品主图")
    private String mainImage;

    @ApiModelProperty("商品子图")
    private String subImages;

    @ApiModelProperty("商品详情")
    private String detail;

    @ApiModelProperty("商品价格")
    private BigDecimal price;

    @ApiModelProperty("商品库存")
    private Integer stock;

    @ApiModelProperty("商品状态（0-下架，1-上架）")
    private Integer status;

    @ApiModelProperty("审核状态：0-待审核 1-通过 2-拒绝")
    private Integer auditStatus;

    @ApiModelProperty("销量")
    private Integer sales;

    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty("逻辑删除标志（0-未删除，1-已删除）")
    @TableLogic
    private Integer deleted;

    @ApiModelProperty("原价")
    private BigDecimal originalPrice;

    @ApiModelProperty("是否推荐：0-否 1-是")
    private Integer isRecommend;

    @ApiModelProperty("是否新品：0-否 1-是")
    private Integer isNew;

    @ApiModelProperty("是否热销：0-否 1-是")
    private Integer isHot;

    @ApiModelProperty("浏览量")
    private Integer viewCount;

    @ApiModelProperty("商品规格JSON")
    private String specs;

    @ApiModelProperty("商品参数JSON")
    private String params;

    @ApiModelProperty("收藏数量")
    private Integer favoriteCount;
} 